<template>
  <div style="display: flex;justify-content: center">
    <h1>销售出库</h1>
  </div>
  <el-row>
    <el-col :span="8">
      客户<el-select v-model="customer" placeholder="请选择客户" size="large" >
      <el-option label="戴尔" value="gz">戴尔</el-option>
      <el-option label="惠普" value="dz">惠普</el-option>
      <el-option label="神州" value="bk">神州</el-option>
    </el-select>
    </el-col>
    <el-col :span="8">销售员</el-col>
    <el-col :span="8">订单金额</el-col>
  </el-row>
  <el-row style="margin-top: 30px">
    <el-col :span="8">
      送货地址<el-input style="width: 200px;"/>
    </el-col>
  </el-row>

  <el-row style="margin-top: 30px">
    <el-col :span="4">
      出库物品
    </el-col>
  </el-row>
  <div>
    <el-table :data="cutBean.records" style="width: 100%;border: 1px #000 solid">
      <el-table-column prop="name" label="商品名称"/>
      <el-table-column prop="job" label="品牌"/>
      <el-table-column prop="birthday" label="建议销售价"/>
      <el-table-column prop="price" label="出库数量"/>
      <el-table-column fixed="right" label="操作" width="220">
        <template #default="scope">
          <el-button type="danger" @click="del(scope.row)">移除商品</el-button>
        </template>
      </el-table-column>
    </el-table>
<!--    <el-pagination-->
<!--        v-model:currentPage="cutBean.current"-->
<!--        v-model:page-size="cutBean.size"-->
<!--        background-->
<!--        layout="prev, pager, next, jumper"-->
<!--        :total="cutBean.total"-->
<!--        @current-change="findByItem"-->
<!--    />-->
  </div>
  <el-row style="margin-top: 30px">
    <el-col :span="12">
      <el-button type="primary" @click="dialogVisible = true">添加商品</el-button>
    </el-col>
    <el-col :span="12">
      <el-button type="primary" @click="out()">出库</el-button>
    </el-col>
  </el-row>

  <!--      添加信息弹出框-->
  <el-dialog
      v-model="dialogVisible"
      title="添加出库商品"
      width="60%"
  >
    <div>
      <el-table :data="cutBean.records" style="width: 100%;border: 1px #000 solid">
        <el-table-column prop="name" label="商品名称"/>
        <el-table-column prop="job" label="品牌"/>
        <el-table-column prop="birthday" label="建议销售价"/>
        <el-table-column fixed="right" label="操作" width="220">
          <template #default="scope">
            <el-button type="danger" @click="add(scope.row)">添加</el-button>
          </template>
        </el-table-column>
      </el-table>
      <el-pagination
          v-model:currentPage="cutBean.current"
          v-model:page-size="cutBean.size"
          background
          layout="prev, pager, next, jumper"
          :total="cutBean.total"
          @current-change="findByItem"
      />
    </div>
    <!--    条件查询-->
    <div>
      <div style="display: flex;justify-content: space-around;margin-top: 20px">
        <div>商品名称<el-input style="width: 200px;"/></div>
        <div>类别 <el-select v-model="customer" placeholder="请选择类别" size="large" >
          <el-option label="戴尔" value="gz">戴尔</el-option>
          <el-option label="惠普" value="dz">惠普</el-option>
          <el-option label="神州" value="bk">神州</el-option>
        </el-select>
        </div>
        <div><el-button type="primary" @click="" style="margin-top: 16px">查询</el-button></div>
      </div>
    </div>
    <template #footer>
      <span class="dialog-footer">
        <el-button @click="dialogVisible = false">取消</el-button>
        <el-button type="primary" @click="dialogVisible = false">添加</el-button>
      </span>
    </template>
  </el-dialog>
</template>

<script>
export default {
name: "sell",
data(){
    return{
    customer:"",
      supplierObj: {},
      cutBean: {
        records: [
          {id: 2, name: "haha", job: "老板", birthday: "1993-02-01",price:"20555"},
          {id: 3, name: "oo", job: "boss", birthday: "1996-02-01"},
          {id: 1, name: "dd", job: "boss2", birthday: "1995-02-01"},
          {id: 4, name: "cc", job: "boss3", birthday: "1994-02-01"},
        ],
        total: 20,
        pages: 5,
        size: 4,
        current: 1
      },
      dialogVisible: false,
      infoVisible:false,
        }
    }
}
</script>

<style scoped>

</style>